package com.ravi.model.vo;

import com.ravi.model.dto.CheckRoomDto;
import lombok.Data;

@Data
public class CheckRoomVo {
	private Integer roomId; // 科室Id

	private String roomName; // 科室名称

	private String roomGender; // 科室性别

	private String areaName; // 检查区名称

	private String preRoomType; // 前置诊室类型

	private String address; // 地址

	private Integer maxWait; // 排序上限

	public CheckRoomVo(CheckRoomDto dto, String preRoomType) {
		this.roomId = dto.getRoomId();
		this.roomName = dto.getRoomName();
		this.roomGender = getGenderString(dto.getRoomGender());
		this.areaName = dto.getAreaName();
		this.preRoomType = preRoomType;
		this.address = dto.getAddress();
		this.maxWait = dto.getMaxWait();
	}

	private String getGenderString(Integer gender) {
		switch (gender) {
			case 0:
				return "无限制";
			case 1:
				return "男";
			case 2:
				return "女";
			default:
				return "未知";
		}
	}
}
